package com.junbao.module.main.kt

/**
 *    author : Majunbao
 *    github : https://github.com/MaJunBaox
 *    time   : 2022/8/28 1:23 下午
 *    desc   :
 */
fun main() {

//    val result = "majunbao".let {
//        println(it.length)
//        1000
//    }
//
//    //返回reciver
//    var result2 = "nideyidaa".apply {
//        println(length)
//    }


   // println(result)
   // println(result2)


    val person = Person1("majunbao",18)
    val res = with(person){
        name="123"
        age = 567
        780
    }
    println(res)
    println(person.name)



    var a = "123".let{
    "!23123"
    }

    var b = "123".also{
        "!23123"
    }

    println(a)
    println(b)
}

class Person1(var name :String , var age :Int)